ezii-os 0.0.0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/Icon/r +0 -0
  3. data/app/assets/stylesheets/apis.scss +3 -0
  4. data/app/assets/stylesheets/basecamp_integrations.scss +3 -0
  5. data/app/assets/stylesheets/code_link_batches.scss +3 -0
  6. data/app/assets/stylesheets/code_link_types.scss +3 -0
  7. data/app/assets/stylesheets/code_links.scss +3 -0
  8. data/app/assets/stylesheets/codes.scss +3 -0
  9. data/app/assets/stylesheets/cookie_changes.scss +3 -0
  10. data/app/assets/stylesheets/partners/get_paids.scss +3 -0
  11. data/app/assets/stylesheets/searches.scss +3 -0
  12. data/app/assets/stylesheets/types.scss +3 -0
  13. data/app/controllers/apis_controller.rb +74 -0
  14. data/app/controllers/basecamp_integrations_controller.rb +76 -0
  15. data/app/controllers/code_link_batches_controller.rb +74 -0
  16. data/app/controllers/code_link_types_controller.rb +74 -0
  17. data/app/controllers/code_links_controller.rb +74 -0
  18. data/app/controllers/codes_controller.rb +74 -0
  19. data/app/controllers/cookie_changes_controller.rb +78 -0
  20. data/app/controllers/directories_controller.rb +14 -14
  21. data/app/controllers/ezii_os_files_controller.rb +14 -1
  22. data/app/controllers/partners/get_paids_controller.rb +74 -0
  23. data/app/controllers/searches_controller.rb +74 -0
  24. data/app/controllers/types_controller.rb +74 -0
  25. data/app/helpers/apis_helper.rb +2 -0
  26. data/app/helpers/basecamp_integrations_helper.rb +2 -0
  27. data/app/helpers/code_link_batches_helper.rb +2 -0
  28. data/app/helpers/code_link_types_helper.rb +2 -0
  29. data/app/helpers/code_links_helper.rb +2 -0
  30. data/app/helpers/codes_helper.rb +2 -0
  31. data/app/helpers/cookie_changes_helper.rb +2 -0
  32. data/app/helpers/partners/get_paids_helper.rb +2 -0
  33. data/app/helpers/searches_helper.rb +2 -0
  34. data/app/helpers/types_helper.rb +2 -0
  35. data/app/models/api.rb +3 -0
  36. data/app/models/basecamp_integration.rb +2 -0
  37. data/app/models/code.rb +3 -0
  38. data/app/models/code_link.rb +3 -0
  39. data/app/models/code_link_batch.rb +3 -0
  40. data/app/models/code_link_type.rb +3 -0
  41. data/app/models/cookie_change.rb +2 -0
  42. data/app/models/partners/get_paid.rb +2 -0
  43. data/app/models/partners.rb +5 -0
  44. data/app/models/search.rb +2 -0
  45. data/app/models/type.rb +3 -0
  46. data/app/views/apis/_api.json.jbuilder +2 -0
  47. data/app/views/apis/_form.html.erb +32 -0
  48. data/app/views/apis/edit.html.erb +6 -0
  49. data/app/views/apis/index.html.erb +31 -0
  50. data/app/views/apis/index.json.jbuilder +1 -0
  51. data/app/views/apis/new.html.erb +5 -0
  52. data/app/views/apis/show.html.erb +19 -0
  53. data/app/views/apis/show.json.jbuilder +1 -0
  54. data/app/views/basecamp_integrations/_basecamp_integration.json.jbuilder +2 -0
  55. data/app/views/basecamp_integrations/_form.html.erb +27 -0
  56. data/app/views/basecamp_integrations/edit.html.erb +6 -0
  57. data/app/views/basecamp_integrations/index.html.erb +29 -0
  58. data/app/views/basecamp_integrations/index.json.jbuilder +1 -0
  59. data/app/views/basecamp_integrations/new.html.erb +5 -0
  60. data/app/views/basecamp_integrations/show.html.erb +14 -0
  61. data/app/views/basecamp_integrations/show.json.jbuilder +1 -0
  62. data/app/views/code_link_batches/_code_link_batch.json.jbuilder +2 -0
  63. data/app/views/code_link_batches/_form.html.erb +27 -0
  64. data/app/views/code_link_batches/edit.html.erb +6 -0
  65. data/app/views/code_link_batches/index.html.erb +29 -0
  66. data/app/views/code_link_batches/index.json.jbuilder +1 -0
  67. data/app/views/code_link_batches/new.html.erb +5 -0
  68. data/app/views/code_link_batches/show.html.erb +14 -0
  69. data/app/views/code_link_batches/show.json.jbuilder +1 -0
  70. data/app/views/code_link_types/_code_link_type.json.jbuilder +2 -0
  71. data/app/views/code_link_types/_form.html.erb +27 -0
  72. data/app/views/code_link_types/edit.html.erb +6 -0
  73. data/app/views/code_link_types/index.html.erb +29 -0
  74. data/app/views/code_link_types/index.json.jbuilder +1 -0
  75. data/app/views/code_link_types/new.html.erb +5 -0
  76. data/app/views/code_link_types/show.html.erb +14 -0
  77. data/app/views/code_link_types/show.json.jbuilder +1 -0
  78. data/app/views/code_links/_code_link.json.jbuilder +2 -0
  79. data/app/views/code_links/_form.html.erb +32 -0
  80. data/app/views/code_links/edit.html.erb +6 -0
  81. data/app/views/code_links/index.html.erb +31 -0
  82. data/app/views/code_links/index.json.jbuilder +1 -0
  83. data/app/views/code_links/new.html.erb +5 -0
  84. data/app/views/code_links/show.html.erb +19 -0
  85. data/app/views/code_links/show.json.jbuilder +1 -0
  86. data/app/views/codes/_code.json.jbuilder +2 -0
  87. data/app/views/codes/_form.html.erb +32 -0
  88. data/app/views/codes/edit.html.erb +6 -0
  89. data/app/views/codes/index.html.erb +31 -0
  90. data/app/views/codes/index.json.jbuilder +1 -0
  91. data/app/views/codes/new.html.erb +5 -0
  92. data/app/views/codes/show.html.erb +19 -0
  93. data/app/views/codes/show.json.jbuilder +1 -0
  94. data/app/views/cookie_changes/_cookie_change.json.jbuilder +2 -0
  95. data/app/views/cookie_changes/_form.html.erb +27 -0
  96. data/app/views/cookie_changes/edit.html.erb +6 -0
  97. data/app/views/cookie_changes/index.html.erb +29 -0
  98. data/app/views/cookie_changes/index.json.jbuilder +1 -0
  99. data/app/views/cookie_changes/new.html.erb +5 -0
  100. data/app/views/cookie_changes/show.html.erb +14 -0
  101. data/app/views/cookie_changes/show.json.jbuilder +1 -0
  102. data/app/views/directories/show.html.erb +6 -1
  103. data/app/views/ezii_os_files/_wit_ai_widget.html.erb +203 -49
  104. data/app/views/ezii_os_files/show.html.erb +6 -9
  105. data/app/views/layouts/application.html.erb +212 -52
  106. data/app/views/partners/get_paids/_form.html.erb +27 -0
  107. data/app/views/partners/get_paids/_partners_get_paid.json.jbuilder +2 -0
  108. data/app/views/partners/get_paids/edit.html.erb +6 -0
  109. data/app/views/partners/get_paids/index.html.erb +29 -0
  110. data/app/views/partners/get_paids/index.json.jbuilder +1 -0
  111. data/app/views/partners/get_paids/new.html.erb +5 -0
  112. data/app/views/partners/get_paids/show.html.erb +14 -0
  113. data/app/views/partners/get_paids/show.json.jbuilder +1 -0
  114. data/app/views/searches/_form.html.erb +22 -0
  115. data/app/views/searches/_search.json.jbuilder +2 -0
  116. data/app/views/searches/edit.html.erb +6 -0
  117. data/app/views/searches/index.html.erb +27 -0
  118. data/app/views/searches/index.json.jbuilder +1 -0
  119. data/app/views/searches/new.html.erb +5 -0
  120. data/app/views/searches/show.html.erb +9 -0
  121. data/app/views/searches/show.json.jbuilder +1 -0
  122. data/app/views/types/_form.html.erb +22 -0
  123. data/app/views/types/_type.json.jbuilder +2 -0
  124. data/app/views/types/edit.html.erb +6 -0
  125. data/app/views/types/index.html.erb +27 -0
  126. data/app/views/types/index.json.jbuilder +1 -0
  127. data/app/views/types/new.html.erb +5 -0
  128. data/app/views/types/show.html.erb +9 -0
  129. data/app/views/types/show.json.jbuilder +1 -0
  130. data/config/credentials.yml.enc +1 -1
  131. data/config/routes.rb +12 -0
  132. data/db/development.sqlite3 +0 -0
  133. data/db/migrate/20190827060151_create_searches.rb +9 -0
  134. data/db/migrate/20190827063427_create_partners_get_paids.rb +10 -0
  135. data/db/migrate/20190827180750_create_basecamp_integrations.rb +10 -0
  136. data/db/migrate/20190827180751_create_types.rb +9 -0
  137. data/db/migrate/20190827180752_create_code_link_types.rb +10 -0
  138. data/db/migrate/20190827180753_create_code_links.rb +11 -0
  139. data/db/migrate/20190827180754_create_codes.rb +11 -0
  140. data/db/migrate/20190828104427_create_apis.rb +12 -0
  141. data/db/migrate/20190828105156_create_code_link_batches.rb +10 -0
  142. data/db/migrate/20190829174432_create_cookie_changes.rb +10 -0
  143. data/db/schema.rb +88 -1
  144. data/db/seeds.rb +4 -0
  145. data/db/test.sqlite3 +0 -0
  146. data/ezii-os-0.0.0.1.0.gem +0 -0
  147. data/ezii-os.gemspec +1 -1
  148. data/lib/tasks/task.rake +5 -0
  149. data/log/development.log +13283 -0
  150. data/test/controllers/apis_controller_test.rb +48 -0
  151. data/test/controllers/basecamp_integrations_controller_test.rb +48 -0
  152. data/test/controllers/code_link_batches_controller_test.rb +48 -0
  153. data/test/controllers/code_link_types_controller_test.rb +48 -0
  154. data/test/controllers/code_links_controller_test.rb +48 -0
  155. data/test/controllers/codes_controller_test.rb +48 -0
  156. data/test/controllers/cookie_changes_controller_test.rb +48 -0
  157. data/test/controllers/partners/get_paids_controller_test.rb +48 -0
  158. data/test/controllers/searches_controller_test.rb +48 -0
  159. data/test/controllers/types_controller_test.rb +48 -0
  160. data/test/fixtures/apis.yml +11 -0
  161. data/test/fixtures/basecamp_integrations.yml +9 -0
  162. data/test/fixtures/code_link_batches.yml +9 -0
  163. data/test/fixtures/code_link_types.yml +9 -0
  164. data/test/fixtures/code_links.yml +11 -0
  165. data/test/fixtures/codes.yml +11 -0
  166. data/test/fixtures/cookie_changes.yml +9 -0
  167. data/test/fixtures/partners/get_paids.yml +9 -0
  168. data/test/fixtures/searches.yml +7 -0
  169. data/test/fixtures/types.yml +7 -0
  170. data/test/models/api_test.rb +7 -0
  171. data/test/models/basecamp_integration_test.rb +7 -0
  172. data/test/models/code_link_batch_test.rb +7 -0
  173. data/test/models/code_link_test.rb +7 -0
  174. data/test/models/code_link_type_test.rb +7 -0
  175. data/test/models/code_test.rb +7 -0
  176. data/test/models/cookie_change_test.rb +7 -0
  177. data/test/models/partners/get_paid_test.rb +7 -0
  178. data/test/models/search_test.rb +7 -0
  179. data/test/models/type_test.rb +7 -0
  180. data/test/system/apis_test.rb +47 -0
  181. data/test/system/basecamp_integrations_test.rb +45 -0
  182. data/test/system/code_link_batches_test.rb +45 -0
  183. data/test/system/code_link_types_test.rb +45 -0
  184. data/test/system/code_links_test.rb +47 -0
  185. data/test/system/codes_test.rb +47 -0
  186. data/test/system/cookie_changes_test.rb +45 -0
  187. data/test/system/partners/get_paids_test.rb +45 -0
  188. data/test/system/searches_test.rb +43 -0
  189. data/test/system/types_test.rb +43 -0
  190. metadata +176 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3815af454ff9a00962a50805f7737d85776ed790aa4460703bacd66227a6e65e
4
- data.tar.gz: fe23229da9631fb027a3b497db83b6427f253b5896d44d7a11b59c82195e3f0c
3
+ metadata.gz: af2702b497fa0c6932e35c160431d0f9d285a213471a10291042b519de1b0d61
4
+ data.tar.gz: 307d0c8177472427f1e135cd12c62f7a032b7e6074793b2b994750ac568d87e9
5
5
  SHA512:
6
- metadata.gz: 854dfa40a8012c0a633ebe2ae926190637ff77c153ad442d94815d732597cfcfcbb0383b1ea0dbd4ff22ae900c3accfc16032d249deb95ca60ec25c1a089e6a6
7
- data.tar.gz: b950ac0ac446b40049162f9131c640e66720468c05081d763fac2062d32629570c3fe2dde9db2aa11841ba9cb43d370eec4ed90631f7f3265d42b89338d4db47
6
+ metadata.gz: c843d4043089ad0b433fbc5d1bce4e3ab9e176f46d0d6b020de61edc44880c5c3c2d85b7e42f4e98ff3c03946387619a4e7de03e246292f8e029cce4de424743
7
+ data.tar.gz: 73782c21e30ec5cba574e42f1f3235c43dfb20b81de8902c79f31913277e789b7a9ed0ebfe83ee7eb2b99f2f4c5e4e8176602d60277aaacc5b5cd8909b29c919
data/Icon/r ADDED
File without changes
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the apis controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the basecamp_integrations controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the code_link_batches controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the code_link_types controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the code_links controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the codes controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the cookie_changes controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the partners/get-paids controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the searches controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the types controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,74 @@
1
+ class ApisController < ApplicationController
2
+ before_action :set_api, only: [:show, :edit, :update, :destroy]
3
+
4
+ # GET /apis
5
+ # GET /apis.json
6
+ def index
7
+ @apis = Api.all
8
+ end
9
+
10
+ # GET /apis/1
11
+ # GET /apis/1.json
12
+ def show
13
+ end
14
+
15
+ # GET /apis/new
16
+ def new
17
+ @api = Api.new
18
+ end
19
+
20
+ # GET /apis/1/edit
21
+ def edit
22
+ end
23
+
24
+ # POST /apis
25
+ # POST /apis.json
26
+ def create
27
+ @api = Api.new(api_params)
28
+
29
+ respond_to do |format|
30
+ if @api.save
31
+ format.html { redirect_to @api, notice: 'Api was successfully created.' }
32
+ format.json { render :show, status: :created, location: @api }
33
+ else
34
+ format.html { render :new }
35
+ format.json { render json: @api.errors, status: :unprocessable_entity }
36
+ end
37
+ end
38
+ end
39
+
40
+ # PATCH/PUT /apis/1
41
+ # PATCH/PUT /apis/1.json
42
+ def update
43
+ respond_to do |format|
44
+ if @api.update(api_params)
45
+ format.html { redirect_to @api, notice: 'Api was successfully updated.' }
46
+ format.json { render :show, status: :ok, location: @api }
47
+ else
48
+ format.html { render :edit }
49
+ format.json { render json: @api.errors, status: :unprocessable_entity }
50
+ end
51
+ end
52
+ end
53
+
54
+ # DELETE /apis/1
55
+ # DELETE /apis/1.json
56
+ def destroy
57
+ @api.destroy
58
+ respond_to do |format|
59
+ format.html { redirect_to apis_url, notice: 'Api was successfully destroyed.' }
60
+ format.json { head :no_content }
61
+ end
62
+ end
63
+
64
+ private
65
+ # Use callbacks to share common setup or constraints between actions.
66
+ def set_api
67
+ @api = Api.find(params[:id])
68
+ end
69
+
70
+ # Never trust parameters from the scary internet, only allow the white list through.
71
+ def api_params
72
+ params.require(:api).permit(:rfc, :rftrolling_foreign_key, :code_id)
73
+ end
74
+ end
@@ -0,0 +1,76 @@
1
+ class BasecampIntegrationsController < ApplicationController
2
+ http_basic_authenticate_with name: "USER", password: ENV['PASSWORD'] || Rails.application.credentials.password
3
+
4
+ before_action :set_basecamp_integration, only: [:show, :edit, :update, :destroy]
5
+
6
+ # GET /basecamp_integrations
7
+ # GET /basecamp_integrations.json
8
+ def index
9
+ @basecamp_integrations = BasecampIntegration.all
10
+ end
11
+
12
+ # GET /basecamp_integrations/1
13
+ # GET /basecamp_integrations/1.json
14
+ def show
15
+ end
16
+
17
+ # GET /basecamp_integrations/new
18
+ def new
19
+ @basecamp_integration = BasecampIntegration.new
20
+ end
21
+
22
+ # GET /basecamp_integrations/1/edit
23
+ def edit
24
+ end
25
+
26
+ # POST /basecamp_integrations
27
+ # POST /basecamp_integrations.json
28
+ def create
29
+ @basecamp_integration = BasecampIntegration.new(basecamp_integration_params)
30
+
31
+ respond_to do |format|
32
+ if @basecamp_integration.save
33
+ format.html { redirect_to @basecamp_integration, notice: 'Basecamp integration was successfully created.' }
34
+ format.json { render :show, status: :created, location: @basecamp_integration }
35
+ else
36
+ format.html { render :new }
37
+ format.json { render json: @basecamp_integration.errors, status: :unprocessable_entity }
38
+ end
39
+ end
40
+ end
41
+
42
+ # PATCH/PUT /basecamp_integrations/1
43
+ # PATCH/PUT /basecamp_integrations/1.json
44
+ def update
45
+ respond_to do |format|
46
+ if @basecamp_integration.update(basecamp_integration_params)
47
+ format.html { redirect_to @basecamp_integration, notice: 'Basecamp integration was successfully updated.' }
48
+ format.json { render :show, status: :ok, location: @basecamp_integration }
49
+ else
50
+ format.html { render :edit }
51
+ format.json { render json: @basecamp_integration.errors, status: :unprocessable_entity }
52
+ end
53
+ end
54
+ end
55
+
56
+ # DELETE /basecamp_integrations/1
57
+ # DELETE /basecamp_integrations/1.json
58
+ def destroy
59
+ @basecamp_integration.destroy
60
+ respond_to do |format|
61
+ format.html { redirect_to basecamp_integrations_url, notice: 'Basecamp integration was successfully destroyed.' }
62
+ format.json { head :no_content }
63
+ end
64
+ end
65
+
66
+ private
67
+ # Use callbacks to share common setup or constraints between actions.
68
+ def set_basecamp_integration
69
+ @basecamp_integration = BasecampIntegration.find(params[:id])
70
+ end
71
+
72
+ # Never trust parameters from the scary internet, only allow the white list through.
73
+ def basecamp_integration_params
74
+ params.require(:basecamp_integration).permit(:description, :code)
75
+ end
76
+ end
@@ -0,0 +1,74 @@
1
+ class CodeLinkBatchesController < ApplicationController
2
+ before_action :set_code_link_batch, only: [:show, :edit, :update, :destroy]
3
+
4
+ # GET /code_link_batches
5
+ # GET /code_link_batches.json
6
+ def index
7
+ @code_link_batches = CodeLinkBatch.all
8
+ end
9
+
10
+ # GET /code_link_batches/1
11
+ # GET /code_link_batches/1.json
12
+ def show
13
+ end
14
+
15
+ # GET /code_link_batches/new
16
+ def new
17
+ @code_link_batch = CodeLinkBatch.new
18
+ end
19
+
20
+ # GET /code_link_batches/1/edit
21
+ def edit
22
+ end
23
+
24
+ # POST /code_link_batches
25
+ # POST /code_link_batches.json
26
+ def create
27
+ @code_link_batch = CodeLinkBatch.new(code_link_batch_params)
28
+
29
+ respond_to do |format|
30
+ if @code_link_batch.save
31
+ format.html { redirect_to @code_link_batch, notice: 'Code link batch was successfully created.' }
32
+ format.json { render :show, status: :created, location: @code_link_batch }
33
+ else
34
+ format.html { render :new }
35
+ format.json { render json: @code_link_batch.errors, status: :unprocessable_entity }
36
+ end
37
+ end
38
+ end
39
+
40
+ # PATCH/PUT /code_link_batches/1
41
+ # PATCH/PUT /code_link_batches/1.json
42
+ def update
43
+ respond_to do |format|
44
+ if @code_link_batch.update(code_link_batch_params)
45
+ format.html { redirect_to @code_link_batch, notice: 'Code link batch was successfully updated.' }
46
+ format.json { render :show, status: :ok, location: @code_link_batch }
47
+ else
48
+ format.html { render :edit }
49
+ format.json { render json: @code_link_batch.errors, status: :unprocessable_entity }
50
+ end
51
+ end
52
+ end
53
+
54
+ # DELETE /code_link_batches/1
55
+ # DELETE /code_link_batches/1.json
56
+ def destroy
57
+ @code_link_batch.destroy
58
+ respond_to do |format|
59
+ format.html { redirect_to code_link_batches_url, notice: 'Code link batch was successfully destroyed.' }
60
+ format.json { head :no_content }
61
+ end
62
+ end
63
+
64
+ private
65
+ # Use callbacks to share common setup or constraints between actions.
66
+ def set_code_link_batch
67
+ @code_link_batch = CodeLinkBatch.find(params[:id])
68
+ end
69
+
70
+ # Never trust parameters from the scary internet, only allow the white list through.
71
+ def code_link_batch_params
72
+ params.require(:code_link_batch).permit(:description, :code_link_id)
73
+ end
74
+ end
@@ -0,0 +1,74 @@
1
+ class CodeLinkTypesController < ApplicationController
2
+ before_action :set_code_link_type, only: [:show, :edit, :update, :destroy]
3
+
4
+ # GET /code_link_types
5
+ # GET /code_link_types.json
6
+ def index
7
+ @code_link_types = CodeLinkType.all
8
+ end
9
+
10
+ # GET /code_link_types/1
11
+ # GET /code_link_types/1.json
12
+ def show
13
+ end
14
+
15
+ # GET /code_link_types/new
16
+ def new
17
+ @code_link_type = CodeLinkType.new
18
+ end
19
+
20
+ # GET /code_link_types/1/edit
21
+ def edit
22
+ end
23
+
24
+ # POST /code_link_types
25
+ # POST /code_link_types.json
26
+ def create
27
+ @code_link_type = CodeLinkType.new(code_link_type_params)
28
+
29
+ respond_to do |format|
30
+ if @code_link_type.save
31
+ format.html { redirect_to @code_link_type, notice: 'Code link type was successfully created.' }
32
+ format.json { render :show, status: :created, location: @code_link_type }
33
+ else
34
+ format.html { render :new }
35
+ format.json { render json: @code_link_type.errors, status: :unprocessable_entity }
36
+ end
37
+ end
38
+ end
39
+
40
+ # PATCH/PUT /code_link_types/1
41
+ # PATCH/PUT /code_link_types/1.json
42
+ def update
43
+ respond_to do |format|
44
+ if @code_link_type.update(code_link_type_params)
45
+ format.html { redirect_to @code_link_type, notice: 'Code link type was successfully updated.' }
46
+ format.json { render :show, status: :ok, location: @code_link_type }
47
+ else
48
+ format.html { render :edit }
49
+ format.json { render json: @code_link_type.errors, status: :unprocessable_entity }
50
+ end
51
+ end
52
+ end
53
+
54
+ # DELETE /code_link_types/1
55
+ # DELETE /code_link_types/1.json
56
+ def destroy
57
+ @code_link_type.destroy
58
+ respond_to do |format|
59
+ format.html { redirect_to code_link_types_url, notice: 'Code link type was successfully destroyed.' }
60
+ format.json { head :no_content }
61
+ end
62
+ end
63
+
64
+ private
65
+ # Use callbacks to share common setup or constraints between actions.
66
+ def set_code_link_type
67
+ @code_link_type = CodeLinkType.find(params[:id])
68
+ end
69
+
70
+ # Never trust parameters from the scary internet, only allow the white list through.
71
+ def code_link_type_params
72
+ params.require(:code_link_type).permit(:type_description, :type_id)
73
+ end
74
+ end
@@ -0,0 +1,74 @@
1
+ class CodeLinksController < ApplicationController
2
+ before_action :set_code_link, only: [:show, :edit, :update, :destroy]
3
+
4
+ # GET /code_links
5
+ # GET /code_links.json
6
+ def index
7
+ @code_links = CodeLink.all
8
+ end
9
+
10
+ # GET /code_links/1
11
+ # GET /code_links/1.json
12
+ def show
13
+ end
14
+
15
+ # GET /code_links/new
16
+ def new
17
+ @code_link = CodeLink.new
18
+ end
19
+
20
+ # GET /code_links/1/edit
21
+ def edit
22
+ end
23
+
24
+ # POST /code_links
25
+ # POST /code_links.json
26
+ def create
27
+ @code_link = CodeLink.new(code_link_params)
28
+
29
+ respond_to do |format|
30
+ if @code_link.save
31
+ format.html { redirect_to @code_link, notice: 'Code link was successfully created.' }
32
+ format.json { render :show, status: :created, location: @code_link }
33
+ else
34
+ format.html { render :new }
35
+ format.json { render json: @code_link.errors, status: :unprocessable_entity }
36
+ end
37
+ end
38
+ end
39
+
40
+ # PATCH/PUT /code_links/1
41
+ # PATCH/PUT /code_links/1.json
42
+ def update
43
+ respond_to do |format|
44
+ if @code_link.update(code_link_params)
45
+ format.html { redirect_to @code_link, notice: 'Code link was successfully updated.' }
46
+ format.json { render :show, status: :ok, location: @code_link }
47
+ else
48
+ format.html { render :edit }
49
+ format.json { render json: @code_link.errors, status: :unprocessable_entity }
50
+ end
51
+ end
52
+ end
53
+
54
+ # DELETE /code_links/1
55
+ # DELETE /code_links/1.json
56
+ def destroy
57
+ @code_link.destroy
58
+ respond_to do |format|
59
+ format.html { redirect_to code_links_url, notice: 'Code link was successfully destroyed.' }
60
+ format.json { head :no_content }
61
+ end
62
+ end
63
+
64
+ private
65
+ # Use callbacks to share common setup or constraints between actions.
66
+ def set_code_link
67
+ @code_link = CodeLink.find(params[:id])
68
+ end
69
+
70
+ # Never trust parameters from the scary internet, only allow the white list through.
71
+ def code_link_params
72
+ params.require(:code_link).permit(:link, :code_link_type_id, :description)
73
+ end
74
+ end
@@ -0,0 +1,74 @@
1
+ class CodesController < ApplicationController
2
+ before_action :set_code, only: [:show, :edit, :update, :destroy]
3
+
4
+ # GET /codes
5
+ # GET /codes.json
6
+ def index
7
+ @codes = Code.all
8
+ end
9
+
10
+ # GET /codes/1
11
+ # GET /codes/1.json
12
+ def show
13
+ end
14
+
15
+ # GET /codes/new
16
+ def new
17
+ @code = Code.new
18
+ end
19
+
20
+ # GET /codes/1/edit
21
+ def edit
22
+ end
23
+
24
+ # POST /codes
25
+ # POST /codes.json
26
+ def create
27
+ @code = Code.new(code_params)
28
+
29
+ respond_to do |format|
30
+ if @code.save
31
+ format.html { redirect_to @code, notice: 'Code was successfully created.' }
32
+ format.json { render :show, status: :created, location: @code }
33
+ else
34
+ format.html { render :new }
35
+ format.json { render json: @code.errors, status: :unprocessable_entity }
36
+ end
37
+ end
38
+ end
39
+
40
+ # PATCH/PUT /codes/1
41
+ # PATCH/PUT /codes/1.json
42
+ def update
43
+ respond_to do |format|
44
+ if @code.update(code_params)
45
+ format.html { redirect_to @code, notice: 'Code was successfully updated.' }
46
+ format.json { render :show, status: :ok, location: @code }
47
+ else
48
+ format.html { render :edit }
49
+ format.json { render json: @code.errors, status: :unprocessable_entity }
50
+ end
51
+ end
52
+ end
53
+
54
+ # DELETE /codes/1
55
+ # DELETE /codes/1.json
56
+ def destroy
57
+ @code.destroy
58
+ respond_to do |format|
59
+ format.html { redirect_to codes_url, notice: 'Code was successfully destroyed.' }
60
+ format.json { head :no_content }
61
+ end
62
+ end
63
+
64
+ private
65
+ # Use callbacks to share common setup or constraints between actions.
66
+ def set_code
67
+ @code = Code.find(params[:id])
68
+ end
69
+
70
+ # Never trust parameters from the scary internet, only allow the white list through.
71
+ def code_params
72
+ params.require(:code).permit(:github_link, :gist_link, :code_links_id)
73
+ end
74
+ end
@@ -0,0 +1,78 @@
1
+ class CookieChangesController < ApplicationController
2
+ before_action :set_cookie_change, only: [:show, :edit, :update, :destroy]
3
+
4
+ skip_before_action :verify_authenticity_token
5
+
6
+ # GET /cookie_changes
7
+ # GET /cookie_changes.json
8
+ def index
9
+ @cookie_changes = CookieChange.all
10
+ end
11
+
12
+ # GET /cookie_changes/1
13
+ # GET /cookie_changes/1.json
14
+ def show
15
+ end
16
+
17
+ # GET /cookie_changes/new
18
+ def new
19
+ @cookie_change = CookieChange.new
20
+ end
21
+
22
+ # GET /cookie_changes/1/edit
23
+ def edit
24
+ end
25
+
26
+ # POST /cookie_changes
27
+ # POST /cookie_changes.json
28
+ def create
29
+ @cookie_change = CookieChange.new(cookie_change_params)
30
+
31
+ respond_to do |format|
32
+ if @cookie_change.save
33
+ cookies[@cookie_change.identifier] = @cookie_change.value
34
+
35
+ format.html { redirect_to @cookie_change, notice: 'Cookie change was successfully created.' }
36
+ format.json { render :show, status: :created, location: @cookie_change }
37
+ else
38
+ format.html { render :new }
39
+ format.json { render json: @cookie_change.errors, status: :unprocessable_entity }
40
+ end
41
+ end
42
+ end
43
+
44
+ # PATCH/PUT /cookie_changes/1
45
+ # PATCH/PUT /cookie_changes/1.json
46
+ def update
47
+ respond_to do |format|
48
+ if @cookie_change.update(cookie_change_params)
49
+ format.html { redirect_to @cookie_change, notice: 'Cookie change was successfully updated.' }
50
+ format.json { render :show, status: :ok, location: @cookie_change }
51
+ else
52
+ format.html { render :edit }
53
+ format.json { render json: @cookie_change.errors, status: :unprocessable_entity }
54
+ end
55
+ end
56
+ end
57
+
58
+ # DELETE /cookie_changes/1
59
+ # DELETE /cookie_changes/1.json
60
+ def destroy
61
+ @cookie_change.destroy
62
+ respond_to do |format|
63
+ format.html { redirect_to cookie_changes_url, notice: 'Cookie change was successfully destroyed.' }
64
+ format.json { head :no_content }
65
+ end
66
+ end
67
+
68
+ private
69
+ # Use callbacks to share common setup or constraints between actions.
70
+ def set_cookie_change
71
+ @cookie_change = CookieChange.find(params[:id])
72
+ end
73
+
74
+ # Never trust parameters from the scary internet, only allow the white list through.
75
+ def cookie_change_params
76
+ params.require(:cookie_change).permit(:identifier, :value)
77
+ end
78
+ end
@@ -20,10 +20,9 @@ class DirectoriesController < ApplicationController
20
20
 
21
21
  case @path.file_system.machine_readable_identifier
22
22
  when 'local'
23
-
24
23
  @paths = Dir
25
24
  .entries(@path.file_system_path)
26
- .sample(10)
25
+ .sample(100)
27
26
  .map do |entry|
28
27
  EziiOsPath.new(
29
28
  File.join(@path.global_path, entry)
@@ -34,11 +33,10 @@ class DirectoriesController < ApplicationController
34
33
  end # filter invisible files
35
34
 
36
35
  when 'dropbox'
37
-
38
36
  dropbox_directory = DropboxDirectory.new(@path.file_system_path)
39
37
  @paths = dropbox_directory
40
38
  .entries
41
- .sample(10)
39
+ .sample(20)
42
40
  .map do |entry|
43
41
  path = EziiOsPath.new(
44
42
  File.join(@path.global_path, entry['name'])
@@ -46,7 +44,9 @@ class DirectoriesController < ApplicationController
46
44
  path.dropbox_metainfo = entry
47
45
  path
48
46
  end
49
-
47
+
48
+ when 'github'
49
+ redirect_to('https://github.com/ezii123/ezii-os/find/master')
50
50
  end
51
51
  end
52
52
 
@@ -99,14 +99,14 @@ class DirectoriesController < ApplicationController
99
99
  end
100
100
  end
101
101
 
102
- private
103
- # Use callbacks to share common setup or constraints between actions.
104
- def set_directory
105
- # @directory = Directory.find(params[:id])
106
- end
102
+ private
103
+ # Use callbacks to share common setup or constraints between actions.
104
+ def set_directory
105
+ # @directory = Directory.find(params[:id])
106
+ end
107
107
 
108
- # Never trust parameters from the scary internet, only allow the white list through.
109
- def directory_params
110
- params.require(:directory).permit(:path)
111
- end
108
+ # Never trust parameters from the scary internet, only allow the white list through.
109
+ def directory_params
110
+ params.require(:directory).permit(:path)
111
+ end
112
112
  end
@@ -1,6 +1,16 @@
1
1
  class EziiOsFilesController < ApplicationController
2
2
  before_action :set_ezii_os_file, only: [:show, :edit, :update, :destroy]
3
3
 
4
+ http_basic_authenticate_with name: "BANAL-TEAM", password: Rails.application.credentials.banal_team_password, if: :need_authentication?
5
+
6
+ private
7
+
8
+ def need_authentication?
9
+ params[:admin].present?
10
+ end
11
+
12
+ public
13
+
4
14
  # GET /ezii_os_files
5
15
  # GET /ezii_os_files.json
6
16
  def index
@@ -19,7 +29,10 @@ class EziiOsFilesController < ApplicationController
19
29
  when 'dropbox'
20
30
  bda = BanalDropboxApi.new
21
31
  bda.download(@path.file_system_path) do |file_content|
22
- t = Tempfile.new
32
+ @last_file_input = file_content
33
+
34
+ t = Tempfile.new(['file', File.extname(@path.file_system_path)])
35
+
23
36
  t.binmode
24
37
  t.write(file_content)
25
38